export function createShouldDebug({ enableDebug = true, debugScope = {} }: { enableDebug?: boolean, debugScope?: Record<string, boolean> } = {}): (scopeName: string) => boolean {
  const isDebug = enableDebug && process.env.NODE_ENV === 'development'
  function shouldDebug(scopeName: string) {
    if (!isDebug) {
      return false
    }
    return debugScope[scopeName]
  }
  return shouldDebug
}